﻿@model QcRiverFlows.Models.Section

@{
    ViewBag.Title = "Edit";
}

<h2>Edit</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>Section</legend>

        @Html.HiddenFor(model => model.Id)

        <div class="editor-label">
            @Html.LabelFor(model => model.CategoryId, "Category")
        </div>
        <div class="editor-field">
            @Html.DropDownList("CategoryId", String.Empty)
            @Html.ValidationMessageFor(model => model.CategoryId)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.RiverId, "River")
        </div>
        <div class="editor-field">
            @Html.DropDownList("RiverId", String.Empty)
            @Html.ValidationMessageFor(model => model.RiverId)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Name)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Description)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Description)
            @Html.ValidationMessageFor(model => model.Description)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Class)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Class)
            @Html.ValidationMessageFor(model => model.Class)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Lenght)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Lenght)
            @Html.ValidationMessageFor(model => model.Lenght)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Shuttle)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Shuttle)
            @Html.ValidationMessageFor(model => model.Shuttle)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.FlowMin)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.FlowMin)
            @Html.ValidationMessageFor(model => model.FlowMin)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.FlowMax)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.FlowMax)
            @Html.ValidationMessageFor(model => model.FlowMax)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Portages)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Portages)
            @Html.ValidationMessageFor(model => model.Portages)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.PutIn)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.PutIn)
            @Html.ValidationMessageFor(model => model.PutIn)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.TakeOut)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.TakeOut)
            @Html.ValidationMessageFor(model => model.TakeOut)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Map)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Map)
            @Html.ValidationMessageFor(model => model.Map)
        </div>

        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
